<?php

include_once '../../Core/Conexion.php';
include_once '../../Core/ControladorSet.php';
include_once '../../Core/InterfazDatos.php';
///****
include_once '../entidades/Institucion.php';
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of editar
 *
 * @author cHr15t14n
 */
class editar extends ControladorSet {

    public function buscarValores() {
        $tabla = "";
        $entidad = new Institucion($_GET['codigo'],"", "", "" ,"", "","","");                
        $consulta = $this->conexion->consultaTabla($entidad);
        $fila = mysql_fetch_array($consulta);

        do {
            $this->diccionario['idInstitucion'] = $fila[0];
            $this->diccionario['codigoAuxiliar'] = $fila[1];
            $this->diccionario['nombre'] = $fila[2];
            $this->diccionario['direccion'] = $fila[3];
            $this->diccionario['telefono1'] = $fila[4];
            $this->diccionario['codigo'] = $fila[5];
            $this->diccionario['email'] = $fila[6];
            $this->diccionario['comentarios'] = $fila[7];
        } while ($fila = mysql_fetch_array($consulta));
    }

    public function setDiccionario() {
        $this->diccionario = array(
            "idInstitucion" => "vacio",
            "codigoAuxiliar" => "vacio",
            "nombre" => "vacio",
            "direccion" => "vacio",
            "telefono1" => "vacio",
            "telefono2" => "vacio",
            "email" => "vacio",
            "comentarios" => "vacio"
        );
    }

    public function setValorSesion() {
        $this->valorSesion = array("admin", "", "");
    }

//put your code here
}

$controlador = new editar('editarVista.php');
$controlador->rederizarPagina();

